package bx.com.smartcashier.mode;



import android.os.Parcel;
import android.os.Parcelable;

import java.math.BigDecimal;

/**
 * @author pengweiwei
 */

public class SmartShopOrderDetailVO implements Parcelable {
    /**
     * 订单明细Id
     */
    private Integer id;
    /**
     * 订单Id
     */
    private Integer shopOrderId;
    /**
     * epcid
     */
    private Integer goodEpcid;
    /**
     *
     */
    private Integer goodsDetailId;
    /**
     * 商品编码
     */
    private String goodsCode;
    /**
     * 数量
     */
    private Integer count;
    /**
     * 折扣
     */
    private String discountRate;
    /**
     * 商品价格
     */
    private BigDecimal retailPrice;


    /**
     * 仓库Id
     */
    private Integer warehouseId;
    /**
     * 折扣后的价格
     */
    private BigDecimal discountPrice;
    /**
     * 商品颜色
     */
    private String goodColor;
    /**
     * 商品名称
     */
    private String goodsName;
    /**
     * 商品型号
     */
    private String goodSize;
    /**
     * 修改时间
     */
    private String gmtModify;
    /**
     * 创建时间
     */
    private String gmtCreate;
    /**
     * 1 正常 -1 删除
     */
    private Integer status;
    /**
     * 唯一码或者barcode
     */
    private String codes;

    private Integer returnCount;

    private String totalSellAmount;

    private String alipayAmount;

    private String wechatAmount;

    private String moneyAmount;

    private String returnAmount;

    private String vipAmount;

    private String cardAmount;

    private String companyName;

    private String shopName;
    /**
     * 真实库存
     */
    private Integer realCount;

    private String shoppingGuideName;

    private String payTypeValue;

    private Integer totalReturnCount;

    private Integer totalSellCount;
    private Integer allSellCount;


    private Boolean checked=true;
    private Integer BuyCount=1;

    private Integer  parentId;


    private Boolean isSale=true;


    private  String  mycode;


    protected SmartShopOrderDetailVO(Parcel in) {
        if (in.readByte() == 0) {
            id = null;
        } else {
            id = in.readInt();
        }
        if (in.readByte() == 0) {
            shopOrderId = null;
        } else {
            shopOrderId = in.readInt();
        }
        if (in.readByte() == 0) {
            goodEpcid = null;
        } else {
            goodEpcid = in.readInt();
        }
        if (in.readByte() == 0) {
            goodsDetailId = null;
        } else {
            goodsDetailId = in.readInt();
        }
        goodsCode = in.readString();
        if (in.readByte() == 0) {
            count = null;
        } else {
            count = in.readInt();
        }
        discountRate = in.readString();
        if (in.readByte() == 0) {
            warehouseId = null;
        } else {
            warehouseId = in.readInt();
        }
        goodColor = in.readString();
        goodsName = in.readString();
        goodSize = in.readString();
        gmtModify = in.readString();
        gmtCreate = in.readString();
        if (in.readByte() == 0) {
            status = null;
        } else {
            status = in.readInt();
        }
        codes = in.readString();
        if (in.readByte() == 0) {
            returnCount = null;
        } else {
            returnCount = in.readInt();
        }
        totalSellAmount = in.readString();
        alipayAmount = in.readString();
        wechatAmount = in.readString();
        moneyAmount = in.readString();
        returnAmount = in.readString();
        vipAmount = in.readString();
        cardAmount = in.readString();
        companyName = in.readString();
        shopName = in.readString();
        if (in.readByte() == 0) {
            realCount = null;
        } else {
            realCount = in.readInt();
        }
        shoppingGuideName = in.readString();
        payTypeValue = in.readString();
        if (in.readByte() == 0) {
            totalReturnCount = null;
        } else {
            totalReturnCount = in.readInt();
        }
        if (in.readByte() == 0) {
            totalSellCount = null;
        } else {
            totalSellCount = in.readInt();
        }
        if (in.readByte() == 0) {
            allSellCount = null;
        } else {
            allSellCount = in.readInt();
        }
        byte tmpChecked = in.readByte();
        checked = tmpChecked == 0 ? null : tmpChecked == 1;
        if (in.readByte() == 0) {
            BuyCount = null;
        } else {
            BuyCount = in.readInt();
        }
        if (in.readByte() == 0) {
            parentId = null;
        } else {
            parentId = in.readInt();
        }
        byte tmpIsSale = in.readByte();
        isSale = tmpIsSale == 0 ? null : tmpIsSale == 1;
        mycode = in.readString();
        retailPrice = new BigDecimal(in.readString());
        discountPrice = new BigDecimal(in.readString());
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        if (id == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(id);
        }
        if (shopOrderId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(shopOrderId);
        }
        if (goodEpcid == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(goodEpcid);
        }
        if (goodsDetailId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(goodsDetailId);
        }
        dest.writeString(goodsCode);
        if (count == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(count);
        }
        dest.writeString(discountRate);
        if (warehouseId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(warehouseId);
        }
        dest.writeString(goodColor);
        dest.writeString(goodsName);
        dest.writeString(goodSize);
        dest.writeString(gmtModify);
        dest.writeString(gmtCreate);
        if (status == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(status);
        }
        dest.writeString(codes);
        if (returnCount == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(returnCount);
        }
        dest.writeString(totalSellAmount);
        dest.writeString(alipayAmount);
        dest.writeString(wechatAmount);
        dest.writeString(moneyAmount);
        dest.writeString(returnAmount);
        dest.writeString(vipAmount);
        dest.writeString(cardAmount);
        dest.writeString(companyName);
        dest.writeString(shopName);
        if (realCount == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(realCount);
        }
        dest.writeString(shoppingGuideName);
        dest.writeString(payTypeValue);
        if (totalReturnCount == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(totalReturnCount);
        }
        if (totalSellCount == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(totalSellCount);
        }
        if (allSellCount == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(allSellCount);
        }
        dest.writeByte((byte) (checked == null ? 0 : checked ? 1 : 2));
        if (BuyCount == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(BuyCount);
        }
        if (parentId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(parentId);
        }
        dest.writeByte((byte) (isSale == null ? 0 : isSale ? 1 : 2));
        dest.writeString(mycode);
        dest.writeString(retailPrice.toString());
        dest.writeString(discountPrice.toString());
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<SmartShopOrderDetailVO> CREATOR = new Creator<SmartShopOrderDetailVO>() {
        @Override
        public SmartShopOrderDetailVO createFromParcel(Parcel in) {
            return new SmartShopOrderDetailVO(in);
        }

        @Override
        public SmartShopOrderDetailVO[] newArray(int size) {
            return new SmartShopOrderDetailVO[size];
        }
    };

    public Boolean getSale() {
        return isSale;
    }

    public void setSale(Boolean sale) {
        isSale = sale;
    }

    public String getMycode() {
        return mycode;
    }

    public void setMycode(String mycode) {
        this.mycode = mycode;
    }

    public Boolean getIsSale() {
        return isSale;
    }

    public void setIsSale(Boolean isSale) {
        this.isSale = isSale;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }




    public Integer getBuyCount() {
        return BuyCount;
    }

    public void setBuyCount(Integer buyCount) {
        BuyCount = buyCount;
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getShopOrderId() {
        return shopOrderId;
    }

    public void setShopOrderId(Integer shopOrderId) {
        this.shopOrderId = shopOrderId;
    }

    public Integer getGoodEpcid() {
        return goodEpcid;
    }

    public void setGoodEpcid(Integer goodEpcid) {
        this.goodEpcid = goodEpcid;
    }

    public Integer getGoodsDetailId() {
        return goodsDetailId;
    }

    public void setGoodsDetailId(Integer goodsDetailId) {
        this.goodsDetailId = goodsDetailId;
    }

    public String getGoodsCode() {
        return goodsCode;
    }

    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getDiscountRate() {
        return discountRate;
    }

    public void setDiscountRate(String discountRate) {
        this.discountRate = discountRate;
    }

    public BigDecimal getRetailPrice() {
        return retailPrice;
    }

    public void setRetailPrice(BigDecimal retailPrice) {
        this.retailPrice = retailPrice;
    }

    public Integer getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Integer warehouseId) {
        this.warehouseId = warehouseId;
    }

    public BigDecimal getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(BigDecimal discountPrice) {
        this.discountPrice = discountPrice;
    }

    public String getGoodColor() {
        return goodColor;
    }

    public void setGoodColor(String goodColor) {
        this.goodColor = goodColor;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodSize() {
        return goodSize;
    }

    public void setGoodSize(String goodSize) {
        this.goodSize = goodSize;
    }

    public String getGmtModify() {
        return gmtModify;
    }

    public void setGmtModify(String gmtModify) {
        this.gmtModify = gmtModify;
    }

    public String getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(String gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCodes() {
        return codes;
    }

    public void setCodes(String codes) {
        this.codes = codes;
    }

    public Integer getReturnCount() {
        return returnCount;
    }

    public void setReturnCount(Integer returnCount) {
        this.returnCount = returnCount;
    }

    public String getTotalSellAmount() {
        return totalSellAmount;
    }

    public void setTotalSellAmount(String totalSellAmount) {
        this.totalSellAmount = totalSellAmount;
    }

    public String getAlipayAmount() {
        return alipayAmount;
    }

    public void setAlipayAmount(String alipayAmount) {
        this.alipayAmount = alipayAmount;
    }

    public String getWechatAmount() {
        return wechatAmount;
    }

    public void setWechatAmount(String wechatAmount) {
        this.wechatAmount = wechatAmount;
    }

    public String getMoneyAmount() {
        return moneyAmount;
    }

    public void setMoneyAmount(String moneyAmount) {
        this.moneyAmount = moneyAmount;
    }

    public String getReturnAmount() {
        return returnAmount;
    }

    public void setReturnAmount(String returnAmount) {
        this.returnAmount = returnAmount;
    }

    public String getVipAmount() {
        return vipAmount;
    }

    public void setVipAmount(String vipAmount) {
        this.vipAmount = vipAmount;
    }

    public String getCardAmount() {
        return cardAmount;
    }

    public void setCardAmount(String cardAmount) {
        this.cardAmount = cardAmount;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Integer getRealCount() {
        return realCount;
    }

    public void setRealCount(Integer realCount) {
        this.realCount = realCount;
    }

    public String getShoppingGuideName() {
        return shoppingGuideName;
    }

    public void setShoppingGuideName(String shoppingGuideName) {
        this.shoppingGuideName = shoppingGuideName;
    }

    public String getPayTypeValue() {
        return payTypeValue;
    }

    public void setPayTypeValue(String payTypeValue) {
        this.payTypeValue = payTypeValue;
    }

    public Integer getTotalReturnCount() {
        return totalReturnCount;
    }

    public void setTotalReturnCount(Integer totalReturnCount) {
        this.totalReturnCount = totalReturnCount;
    }

    public Integer getTotalSellCount() {
        return totalSellCount;
    }

    public void setTotalSellCount(Integer totalSellCount) {
        this.totalSellCount = totalSellCount;
    }

    public Integer getAllSellCount() {
        return allSellCount;
    }

    public void setAllSellCount(Integer allSellCount) {
        this.allSellCount = allSellCount;
    }



    public SmartShopOrderDetailVO() {
    }


    public SmartShopOrderDetailVO(Integer id, Integer shopOrderId, Integer goodEpcid, Integer goodsDetailId, String goodsCode, Integer count, String discountRate, BigDecimal retailPrice, Integer warehouseId, BigDecimal discountPrice, String goodColor, String goodsName, String goodSize, String gmtModify, String gmtCreate, Integer status, String codes, Integer returnCount, String totalSellAmount, String alipayAmount, String wechatAmount, String moneyAmount, String returnAmount, String vipAmount, String cardAmount, String companyName, String shopName, Integer realCount, String shoppingGuideName, String payTypeValue, Integer totalReturnCount, Integer totalSellCount, Integer allSellCount, Boolean checked, Integer buyCount, Integer parentId, Boolean isSale) {
        this.id = id;
        this.shopOrderId = shopOrderId;
        this.goodEpcid = goodEpcid;
        this.goodsDetailId = goodsDetailId;
        this.goodsCode = goodsCode;
        this.count = count;
        this.discountRate = discountRate;
        this.retailPrice = retailPrice;
        this.warehouseId = warehouseId;
        this.discountPrice = discountPrice;
        this.goodColor = goodColor;
        this.goodsName = goodsName;
        this.goodSize = goodSize;
        this.gmtModify = gmtModify;
        this.gmtCreate = gmtCreate;
        this.status = status;
        this.codes = codes;
        this.returnCount = returnCount;
        this.totalSellAmount = totalSellAmount;
        this.alipayAmount = alipayAmount;
        this.wechatAmount = wechatAmount;
        this.moneyAmount = moneyAmount;
        this.returnAmount = returnAmount;
        this.vipAmount = vipAmount;
        this.cardAmount = cardAmount;
        this.companyName = companyName;
        this.shopName = shopName;
        this.realCount = realCount;
        this.shoppingGuideName = shoppingGuideName;
        this.payTypeValue = payTypeValue;
        this.totalReturnCount = totalReturnCount;
        this.totalSellCount = totalSellCount;
        this.allSellCount = allSellCount;
        this.checked = checked;
        BuyCount = buyCount;
        this.parentId = parentId;
        this.isSale = isSale;
    }

    public SmartShopOrderDetailVO(Integer id, Integer shopOrderId, Integer goodEpcid, Integer goodsDetailId, String goodsCode, Integer count, String discountRate, BigDecimal retailPrice, Integer warehouseId, BigDecimal discountPrice, String goodColor, String goodsName, String goodSize, String gmtModify, String gmtCreate, Integer status, String codes, Integer returnCount, String totalSellAmount, String alipayAmount, String wechatAmount, String moneyAmount, String returnAmount, String vipAmount, String cardAmount, String companyName, String shopName, Integer realCount, String shoppingGuideName, String payTypeValue, Integer totalReturnCount, Integer totalSellCount, Integer allSellCount, Boolean checked, Integer buyCount, Integer parentId, Boolean isSale, String mycode) {
        this.id = id;
        this.shopOrderId = shopOrderId;
        this.goodEpcid = goodEpcid;
        this.goodsDetailId = goodsDetailId;
        this.goodsCode = goodsCode;
        this.count = count;
        this.discountRate = discountRate;
        this.retailPrice = retailPrice;
        this.warehouseId = warehouseId;
        this.discountPrice = discountPrice;
        this.goodColor = goodColor;
        this.goodsName = goodsName;
        this.goodSize = goodSize;
        this.gmtModify = gmtModify;
        this.gmtCreate = gmtCreate;
        this.status = status;
        this.codes = codes;
        this.returnCount = returnCount;
        this.totalSellAmount = totalSellAmount;
        this.alipayAmount = alipayAmount;
        this.wechatAmount = wechatAmount;
        this.moneyAmount = moneyAmount;
        this.returnAmount = returnAmount;
        this.vipAmount = vipAmount;
        this.cardAmount = cardAmount;
        this.companyName = companyName;
        this.shopName = shopName;
        this.realCount = realCount;
        this.shoppingGuideName = shoppingGuideName;
        this.payTypeValue = payTypeValue;
        this.totalReturnCount = totalReturnCount;
        this.totalSellCount = totalSellCount;
        this.allSellCount = allSellCount;
        this.checked = checked;
        BuyCount = buyCount;
        this.parentId = parentId;
        this.isSale = isSale;
        this.mycode = mycode;
    }




}
